﻿@* TypeVisibility: Internal *@
@model SlamCms.Web.Sitemaps.Menu
@if (Model.StartingNode.Children.Any() && Model.MaxDepth >= Model.CurrentDepth) {
	<ul class="menu menu-level@Model.CurrentDepth">
		@{ var nodes = Model.StartingNode.Children.Take(Model.MaxNodesPerLevel); }
		@foreach (var sitemapNode in nodes) {
            var className = Model.Sitemap.IsSelected(sitemapNode) ? "selected" : null;
			<li class="@className">
				<a href="@sitemapNode.Url">@sitemapNode.Title</a>
				@Html.DisplayFor(m => Model.CloneForNode(sitemapNode, Model.CurrentDepth + 1), Model.TemplateName)
			</li>
		}
	</ul>
}